﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category9
{
  public class MT985 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagChoiceDefinition U0004;
    private static SwiftTagDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagSubItemDefinition U0012;
    private static SwiftTagDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagSubItemDefinition U0015;
    private static SwiftTagSubItemDefinition U0016;
    private static SwiftTagDefinition U0017;

    [Description("Transaction Reference Number ")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT985.U0002);
      }
    }

    [Description("Transaction Reference Number ")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Account With Institution")]
    public Tag57A AccountWithInstitution_57A
    {
      get
      {
        return new Tag57A((SwiftElement) this, 0, (SwiftDefinitionElement) MT985.U0005);
      }
    }

    [Description("Account With Institution")]
    public Tag57A Tag57A_AccountWithInstitution
    {
      get
      {
        return this.AccountWithInstitution_57A;
      }
    }

    [Description("Account With Institution")]
    public Tag57B AccountWithInstitution_57B
    {
      get
      {
        return new Tag57B((SwiftElement) this, 0, (SwiftDefinitionElement) MT985.U0008);
      }
    }

    [Description("Account With Institution")]
    public Tag57B Tag57B_AccountWithInstitution
    {
      get
      {
        return this.AccountWithInstitution_57B;
      }
    }

    [Description("Account With Institution")]
    public Tag57D AccountWithInstitution_57D
    {
      get
      {
        return new Tag57D((SwiftElement) this, 0, (SwiftDefinitionElement) MT985.U0010);
      }
    }

    [Description("Account With Institution")]
    public Tag57D Tag57D_AccountWithInstitution
    {
      get
      {
        return this.AccountWithInstitution_57D;
      }
    }

    [Description("Enquired Party")]
    public Tag59 EnquiredParty_59
    {
      get
      {
        return new Tag59((SwiftElement) this, 0, (SwiftDefinitionElement) MT985.U0013);
      }
    }

    [Description("Enquired Party")]
    public Tag59 Tag59_EnquiredParty
    {
      get
      {
        return this.EnquiredParty_59;
      }
    }

    [Description("Queries")]
    public Tag75 Queries_75
    {
      get
      {
        return new Tag75((SwiftElement) this, 0, (SwiftDefinitionElement) MT985.U0017);
      }
    }

    [Description("Queries")]
    public Tag75 Tag75_Queries
    {
      get
      {
        return this.Queries_75;
      }
    }

    public MT985()
      : base(true)
    {
    }

    public MT985(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT985.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT985.MessageDefinition = new SwiftMessageDefinition("MT985", "Status Enquiry");
      MT985.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number ");
      MT985.U0002.TagName = ":20:";
      MT985.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT985.U0002.Elements.Add((SwiftDefinitionElement) MT985.U0003);
      MT985.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT985.U0002);
      MT985.U0004 = new SwiftTagChoiceDefinition("Choice", "");
      MT985.U0004.Mandatory = false;
      MT985.U0004.Multiple = true;
      MT985.U0005 = new SwiftTagDefinition("AccountWithInstitution_57A", "Account With Institution");
      MT985.U0005.TagName = ":57A:";
      MT985.U0006 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT985.U0006.Mandatory = false;
      MT985.U0005.Elements.Add((SwiftDefinitionElement) MT985.U0006);
      MT985.U0007 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT985.U0005.Elements.Add((SwiftDefinitionElement) MT985.U0007);
      MT985.U0004.Elements.Add((SwiftDefinitionElement) MT985.U0005);
      MT985.U0008 = new SwiftTagDefinition("AccountWithInstitution_57B", "Account With Institution");
      MT985.U0008.TagName = ":57B:";
      MT985.U000E = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT985.U000E.Mandatory = false;
      MT985.U0008.Elements.Add((SwiftDefinitionElement) MT985.U000E);
      MT985.U000F = new SwiftTagSubItemDefinition("Location", "Location");
      MT985.U000F.Mandatory = false;
      MT985.U0008.Elements.Add((SwiftDefinitionElement) MT985.U000F);
      MT985.U0004.Elements.Add((SwiftDefinitionElement) MT985.U0008);
      MT985.U0010 = new SwiftTagDefinition("AccountWithInstitution_57D", "Account With Institution");
      MT985.U0010.TagName = ":57D:";
      MT985.U0011 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT985.U0011.Mandatory = false;
      MT985.U0010.Elements.Add((SwiftDefinitionElement) MT985.U0011);
      MT985.U0012 = new SwiftTagSubItemDefinition("NameAndAddress", "Name and Address");
      MT985.U0010.Elements.Add((SwiftDefinitionElement) MT985.U0012);
      MT985.U0004.Elements.Add((SwiftDefinitionElement) MT985.U0010);
      MT985.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT985.U0004);
      MT985.U0013 = new SwiftTagDefinition("EnquiredParty_59", "Enquired Party");
      MT985.U0013.TagName = ":59:";
      MT985.U0014 = new SwiftTagSubItemDefinition("Account", "Account");
      MT985.U0014.Mandatory = false;
      MT985.U0015 = new SwiftTagSubItemDefinition("Account_1", "Account");
      MT985.U0014.Elements.Add((SwiftDefinitionElement) MT985.U0015);
      MT985.U0013.Elements.Add((SwiftDefinitionElement) MT985.U0014);
      MT985.U0016 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT985.U0013.Elements.Add((SwiftDefinitionElement) MT985.U0016);
      MT985.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT985.U0013);
      MT985.U0017 = new SwiftTagDefinition("Queries_75", "Queries");
      MT985.U0017.TagName = ":75:";
      MT985.U0017.Mandatory = false;
      MT985.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT985.U0017);
    }
  }
}
